<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.common.enums.ZrType"%>
<%@page import="com.blockchain.console.servlets.financial.bzr.ZrTb"%>
<%@page import="com.blockchain.console.servlets.financial.bzr.ZrSh"%>
<%@page import="com.blockchain.console.service.trading.entity.XlbEntity"%>
<%@page import="com.blockchain.console.servlets.financial.bzr.BzrList"%>
<%@page import="com.blockchain.console.service.financial.entity.BEntity"%>
<%@page import="com.blockchain.console.servlets.financial.cz.CzRgqr"%>
<%@page import="com.blockchain.console.servlets.financial.cz.ExportCzgl"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<%@page import="com.blockchain.common.enums.ChargeType"%>
<%@page import="com.blockchain.console.servlets.financial.AbstractFinancialServlet"%>
<%@page import="com.blockchain.console.servlets.financial.cz.CzglList"%>
<%@page import="com.blockchain.console.service.financial.entity.CzglRecord"%>
<%@page import="com.blockchain.common.enums.ChargeStatus"%>
<%@page import="java.text.DecimalFormat"%>

<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%
		CURRENT_CATEGORY = "CWGL";
		CURRENT_SUB_CATEGORY = "XLBZR";
		PagingResult<BEntity> result = (PagingResult<BEntity>) request.getAttribute("result");
		XlbEntity [] xlbs=(XlbEntity[])request.getAttribute("xlb");
%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
				<div class="r_main">
					<div class="home_main">
						<form action="<%controller.getURI(request, BzrList.class);%>" method="post" name="form1" id="searchForm">
							<div class="box box1 mb15">
								<div class="atil">
									<h3>虚拟币转入</h3>
								</div>
							</div>
							<div class="box box1 mb15">
								<div class="con">
									<div class="admin_input admin_pb">
             							<div class="table top3">
											<p>
												<span>用户ID：</span>
												<input type="text" name="userid" value="<%StringHelper.filterHTML(out, request.getParameter("userid")); %>" class="yhgl_input" />
											</p>
											<p>
												<span>用户名：</span>
												<input type="text" name="yhm" value="<%StringHelper.filterHTML(out, request.getParameter("yhm")); %>" class="yhgl_input" />
											</p>
											<P>
												<span>时间：</span>
												<input type="text" name="s" id="datepicker1" readonly="readonly" class="yhgl_input date" />至
												<input type="text" name="e" id="datepicker2" readonly="readonly" class="yhgl_input date" />
											</P>
										<P>
												<span>币种：</span>
												<select name="bid" class="yhgl_sel" >
														<option>请选择</option>
														<%if(xlbs!=null){for (XlbEntity s: xlbs) {%>
														<option value="<%=s.id%>" <%if (s.id==IntegerParser.parse(request.getParameter("bid"))) {%> selected="selected" <%}%>><%StringHelper.filterHTML(out,s.zwm);%>（<%StringHelper.filterHTML(out,s.ywjc);%>）</option>
														<%}}%>
												</select>
											</P>
											
											
											<P>
												<span>状态：</span>
												<select name="zt" class="yhgl_sel" >
														<option>请选择</option>
														<%
															for (ZrType is : ZrType.values()) {
														%>
														<option value="<%=is.name()%>" <%if (is.name().equals(request.getParameter("zt"))){%> selected="selected" <%} %>><%=is.getName()%></option>
														<%
															}
														%>
												</select>
											</P>
												<div class="mt10">   
												<input name="search" type="submit" class="btn2 mr10" value="搜索" />
											</div>
											<div class="clear"></div>
								</div>
								</div>
								</div>
							</div>
							<table width="100%" border="0" cellspacing="0" cellpadding="3" class="yhgl_table tc">
								<tr class="hsbg">
									<td>序号</td>
									<td>用户ID</td>
									<td>用户名</td>
									<td>币种/简称</td>
									<td>转入数量</td>
									<td>实际到账</td>
									<td>转出地址</td>
									<td>转入地址</td>
									<td>转入时间</td>
									<td>状态</td>
								</tr>
								<%
								BEntity[] items = result.getItems();
										if (items != null) {
											int i=1;
											for (BEntity b : items) {
												if (b == null) {
													continue;
												}
								%>
								<tr class="dhsbg">
									<td><%=b.id%></td>
									<td><%=b.userid%></td>
									<td><%StringHelper.filterHTML(out, b.username);%></td>
									<td><%StringHelper.filterHTML(out, b.b_zwm);%>/<%StringHelper.filterHTML(out, b.b_ywm);%></td>
									<td><%=Formater.formatAmount_6(b.zrsl)%></td>
									<td><%=Formater.formatAmount_6(b.sjdz)%></td>
									<td><%StringHelper.filterHTML(out, b.zr_zcdz);%></td>
									<td><%StringHelper.filterHTML(out, b.zr_zrdz);%></td>
									<td><%=DateTimeParser.format(b.sj,"yyyy-MM-dd HH:mm")%></td>
									<%if(b.zt.getName().equals("否")){ %>
									<td><span class="blue"><a href="<%=controller.getURI(request,ZrSh.class)%>?id=<%=b.id%>" class="mr10">审核</a></span></td>
									<%}else if(b.zt.getName().equals("待退币")) {%>
									<td><span class="blue"><a href="<%=controller.getURI(request,ZrTb.class)%>?id=<%=b.id%>" class="mr10">退币</a></span></td>
									<%}else{ %>
									<td><%=b.zt.getName()%></td>
									<%}%>
								</tr>
								<%}}%>
							</table>
							<%
							AbstractFinancialServlet.rendPagingResult(out, result);
							%>
							<div class="box2 clearfix"></div>
						</form>
					</div>
				</div>
			</div>
			<%@include file="/WEB-INF/include/left.jsp"%>
		</div>
	</div>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
	$(function() {
		$("#datepicker1").datepicker({inline: true});
	    $('#datepicker1').datepicker('option', {dateFormat:'yy-mm-dd'});
	    $("#datepicker2").datepicker({inline: true});
	    $('#datepicker2').datepicker('option', {dateFormat:'yy-mm-dd'});
	    $("#datepicker1").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("s"));%>");
	    $("#datepicker2").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("e"));%>");
	});
	</script>
</body>
</html>
